# 字符串格式化
"""
1. %d %s %f:
    print('susan:%s' %sss)
2. format
"""

name = 'sandbox'
age = 18

result = '{}今年{}岁'.format(name, age)  # 占位
print(result)
result = '{0}今年{1}岁,张三也{1}岁'.format(name, age)  # 变量复用
print(result)
result = '{name}今年{age}岁,张三也{age}岁'.format(name='sandbox', age=18)  # 变量名形式，参数名必须有关键字参数：name='sandbox'
print(result)
